Skip to content

Conversation

@merlinND
Copy link
Contributor

This pull request resolve a crash triggered by the following reproducer (tested on Ubuntu 24.04):

import numpy as np
import polyscope as ps

def main():
    ps.set_program_name("Polyscope slice plane crash reproducer")
    ps.set_use_prefs_file(False)
    ps.set_user_gui_is_on_right_side(False)
    ps.set_verbosity(1)
    ps.set_build_default_gui_panels(False)
    ps.set_ground_plane_mode("none")
    ps.set_window_resizable(True)
    ps.set_window_size(1024, 768)

    ps.init()

    # ----------

    # 1. Slice plane (even if disabled)
    plane = ps.add_scene_slice_plane()
    plane.set_active(True)

    # 2. Raw render image quantity
    ps.add_raw_color_alpha_render_image_quantity(
        "ray_traced_img",
        depth_values=np.full((10, 10), 0.5),
        color_values=np.full((10, 10, 4), 0.5, dtype=np.float32),
        enabled=True,
    )

    # 3. Process selection
    pick_result = ps.pick(screen_coords=(15, 15))
    print(f"{pick_result=}")

    ps.show()

if __name__ == "__main__":
    main()

@merlinND merlinND marked this pull request as draft December 11, 2025 15:49
@nmwsharp
Copy link
Owner

fixed by #369, thank you for reporting this!

@nmwsharp nmwsharp closed this Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants